CentOS 7
Sponsored Link

Oracle Database 12c Release 2 : Pre-Requirements
2015/07/05
 
Install Oracle Database 12c Release 2.
Before Installing, Change some settings for requirements of installing Oracle database on here.
[1]
[2] Install required packages.
[root@dlp ~]#
yum -y install binutils compat-libcap1 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc.i686 ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++l7.i686 libstdc++-devel libstdc++-devel.i686 compat-libstdc++-33 compat-libstdc++-33.i686 libXi libXi.i686 libXtst libXtst.i686 make sysstat

[3] Edit Kernel parameters.
[root@dlp ~]#
MEMTOTAL=$(free -b | sed -n '2p' | awk '{print $2}')

[root@dlp ~]#
SHMMAX=$(expr $MEMTOTAL / 2)

[root@dlp ~]#
SHMMNI=4096

[root@dlp ~]#
PAGESIZE=$(getconf PAGE_SIZE)
[root@dlp ~]#
cat >> /etc/sysctl.conf << EOF
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = $SHMMAX
kernel.shmall = $(expr \( $SHMMAX / $PAGESIZE \) \* \( $SHMMNI / 16 \))
kernel.shmmni = $SHMMNI
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
EOF
[root@dlp ~]#
sysctl -p

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 4185677824
kernel.shmall = 261604864
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
[4] Create user and groups for Oracle Database service.
[root@dlp ~]#
i=54321; for group in oinstall dba backupdba oper dgdba kmdba; do
groupadd -g $i $group; i=$(expr $i + 1)
done
[root@dlp ~]#
useradd -u 1200 -g oinstall -G dba,oper,backupdba,dgdba,kmdba -d /home/oracle oracle

[root@dlp ~]#
passwd oracle

Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@dlp ~]#
mkdir -p /u01/app/oracle

[root@dlp ~]#
chown -R oracle:oinstall /u01/app

[root@dlp ~]#
chmod -R 775 /u01

[root@dlp ~]#
vi /etc/pam.d/login
# near line 14: add

session    required     pam_selinux.so open
session    required     pam_namespace.so
session    required     pam_limits.so
session    optional     pam_keyinit.so force revoke
session    include      system-auth
-session   optional     pam_ck_connector.so

[root@dlp ~]#
vi /etc/security/limits.conf
# add to the end

oracle  soft  nproc   2047
oracle  hard  nproc   16384
oracle  soft  nofile  1024
oracle  hard  nofile  65536
oracle  soft  stack   10240
oracle  hard  stack   32768
[5] Login with the user [oracle] and set environment variables.
dlp login:
oracle
Password:
[oracle@dlp ~]$
vi ~/.bash_profile
# add to the end

umask 022
export ORACLE_BASE=/u01/app/oracle
# create a temporary directory for installation

[oracle@dlp ~]$
mkdir tmp
 
Tweet